global snap, tempH, tempV, snapH, snapV, lastClickOn
if (the locH of sprite lastClickOn > (snapH - 25)) and (the locH of sprite lastClickOn < (snapH + 25)) and ((the locV of sprite lastClickOn > (snapV - 25)) and (the locV of sprite lastClickOn < (snapV + 25))) then
if snap = 0 then
set tempH to the mouseH
set tempV to the mouseV
puppetSound("synthdrip.s")
end if
set the visible of sprite 14 to 1
set snap to 1
if (the mouseH > (tempH - 25)) and (the mouseH < (tempH + 25)) and ((the mouseV > (tempV - 25)) and (the mouseV < (tempV + 25))) then
set the locH of sprite lastClickOn to snapH
set the locV of sprite lastClickOn to snapV
else
set the locH of sprite lastClickOn to the mouseH
set the locV of sprite lastClickOn to the mouseV
end if
updateStage()
else
set snap to 0
set the visible of sprite 14 to 0
set the locH of sprite lastClickOn to the mouseH
set the locV of sprite lastClickOn to the mouseV
end if
updateStage()
go(the frame)
end
on mouseUp
global follow, snap, lastClickOn, homeV, homeH, snapH, snapV, lastOver
set follow to 0
if snap = 1 then
set the locH of sprite lastClickOn to snapH
set the locV of sprite lastClickOn to snapV
updateStage()
wait(20)
if the name of cast the castNum of sprite lastClickOn = "goose" then
hatchEgg()
puppetSound("toots.s")
updateStage()
wait(20)
go(the frame + 1)
else
hatchEgg()
set the visible of sprite 14 to 0
set the visible of sprite (lastClickOn - 6) to 1
set the visible of sprite lastClickOn to 0
set the castNum of sprite lastClickOn to the castNum of sprite lastClickOn - 1
set the locH of sprite lastClickOn to homeH
set the locV of sprite lastClickOn to homeV
puppetSound("swiper.s")
updateStage()
wait(20)
set lastOver to 0
go(the frame - 1)
end if
else
puppetSound("swipe.s")
set the visible of sprite 14 to 0
set the visible of sprite (lastClickOn - 6) to 1
set the visible of sprite lastClickOn to 0
set the castNum of sprite lastClickOn to the castNum of sprite lastClickOn + 1
set the locH of sprite lastClickOn to homeH
set the locV of sprite lastClickOn to homeV
updateStage()
wait(20)
set lastOver to 0
go(the frame - 1)
end if
end
on hatchEgg
global lastClickOn
puppetSound("eggcrack.s")
updateStage()
repeat while soundBusy(1)
end repeat
if lastClickOn = 13 then
set the visible of sprite 15 to 1
end if
set the castNum of sprite lastClickOn to the castNum of sprite lastClickOn + 2